package com.baizhi.springbootshiro.mapper;

import com.baizhi.springbootshiro.entity.Perms;
import com.baizhi.springbootshiro.entity.Role;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author chenzy
 * @email ${email}
 * @date 2020-10-08 01:09:08
 */
@Mapper
public interface PermsMapper extends BaseMapper<Perms> {
    /**
     * 1
     *
     * @param role
     * @return
     */
    List<Perms> getPermsByRole(@Param("role") Role role);

    /**
     * 2
     *
     * @param roles
     * @return
     */
    List<Perms> getPermsByRoles(@Param("roles") List<Role> roles);

    /**
     * 3
     *
     * @param roleIds
     * @return
     */
    List<Perms> getPermsByRoleIds(@Param("roleIds") List<String> roleIds);
}
